﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MVCPets.Data;
using MVCPets.Data.Model;

namespace MVCPets.Helpers
{
  public static class RoleHelper
  {
    public static int GetRoleValue(string roleName)
    {
			var ret = int.MaxValue;
			Role role = Data.DataAccess.DataStore.Query<Role>().Where(R => R.RoleName == roleName).FirstOrDefault();
			if (role != null) ret = role.RoleValue;     
      return ret;
    }
  }
}